<template>
	<view>
		<view style="position: relative;">
			<!-- <u-swiper :height="300" :width="1000" :list="list" :interval="3000"></u-swiper> -->
			<u-icon style="margin-left: 40rpx;margin-top: -380rpx;position: absolute;" name="arrow-left" size="50"
				@click="back"></u-icon>
			<view style="width: 670rpx;margin-left: 40rpx;margin-top: 20rpx;">
				<!-- 热门推荐 -->
				<view style="font-size: 35rpx;font-weight: bolder;">{{data.itemname}}</view>
				<view
					style="border-radius: 20rpx;background-color: #FFFFFF;width: 100%;margin-top: 20rpx;padding-top: 10rpx;font-size: 28rpx;">
					<view class="" style="margin: 40rpx;border-bottom: 1rpx solid #EAEAEA;"
						v-for="(item,index) in data.itemdata" :key="index">
						<view class="jh_u-f-ajb" v-if="item.tellnumber">
							<view class="jh_ellipsis"
								style="font-weight: bolder;overflow:scroll;text-overflow:ellipsis;white-space:normal">
								{{item.affiliationname}}
							</view>
						</view>
						<view class="jh_u-f-ajb" v-if="item.tellnumber" style="margin-top: 15rpx;">
							<view class="jh_ellipsis"
								style="font-weight: bolder;width: 350rpx;overflow:scroll;text-overflow:initial">
								服务电话：{{item.tellnumber}}
							</view>
							<view
								style="width: 120rpx;height: 40rpx;background: linear-gradient(270deg, #FF423F, #FF763F);border-radius: 30rpx;color: #FFFFFF;display: flex;align-items: center;justify-content: center;"
								@click="call(item)">
								拨号
							</view>
						</view>
						<view class="jh_u-f-ajb" v-if="item.rescuenumber" style="margin-top: 15rpx;">
							<view class="jh_ellipsis"
								style="font-weight: bolder;width: 350rpx;overflow:scroll;text-overflow:initial">
								施救电话：{{item.rescuenumber}}
							</view>
							<view
								style="width: 120rpx;height: 40rpx;background: linear-gradient(270deg, #FF423F, #FF763F);border-radius: 30rpx;color: #FFFFFF;display: flex;align-items: center;justify-content: center;"
								@click="call1(item)">
								拨号
							</view>
						</view>
						<view class="jh_u-f-ajb" v-if="item.address" style="margin-top: 15rpx;">
							<view class="jh_ellipsis" style="font-weight: bolder;overflow:scroll;text-overflow:ellipsis;white-space:normal">
								地址/联系人：{{item.address}}
							</view>
						</view>
						<view class="jh_u-f-ajb" v-if="item.scope" style="margin-top: 15rpx;">
							<view class="jh_ellipsis"
								style="font-weight: bolder;overflow:hidden;text-overflow:ellipsis;white-space:normal">
								业务范围：{{item.scope}}
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	var _self;
	// #ifdef MP-WEIXIN
	import amap from '../../js_sdk/amap-wx.130.js';
	// #endif
	export default {
		data() {
			return {
				list: [{
					image: 'https://zhcxservice.145u.net/Images/ZHCX/chengjikuaiche1.png',
				}],
				data: [],
			}
		},
		onLoad(params) {
			_self = this;
			//班次信息
			// 数据格式{"selectDate": "2021/10/26","startStation": "延平","endStation": "南平建阳站"}
			_self.data = JSON.parse(params.data);
			console.log(_self.data);

		},
		created() {},
		methods: {
			back: function() {
				uni.navigateBack();
			},
			call: function(item) {
				//呼叫客服1
				let that = this;
				uni.makePhoneCall({
					phoneNumber: item.tellnumber
				});
			},call1: function(item) {
				//呼叫客服1
				let that = this;
				uni.makePhoneCall({
					phoneNumber: item.rescuenumber
				});
			},
		}
	}
</script>

<style lang="scss">
	.row-rotate {
		transition-duration: 0.3s;
		transform: rotate(0deg);
	}
</style>